package com.hfb.mashibing.alip8.diamondsquarealgorithm.class11;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class Code02_PrintAllSubsquences {
    public static List<String> subs(String s) {
        char[] str = s.toCharArray();
        String path = "";
        List<String> ans = new ArrayList<>();
        process1(str, 0, ans, path);
        return ans;
    }
    public static void process1(char[]str,int index,List<String>ans,String path){
        if (index ==str.length) {
            ans.add(path);
            return;
        }
        String no = path;
        process1(str, index+1, ans, no);
        String yes = path+String.valueOf(str[index]);
        process1(str, index + 1, ans, yes);
    }
    public static List<String> subsNoRepeat(String s){
        char[] str = s.toCharArray();
        String path = "";
        HashSet<String> set = new HashSet<>();
        return null;
    }
}
